var chart1; // globally available
$(document).ready(function() {
   chart1 = new Highcharts.Chart({
      chart: {
         renderTo: 'chart-container-1',
         defaultSeriesType: 'scatter'
      },
      title: {
         text: document.getElementById("nodeName").value
      },
      xAxis: {
         title: {
            enabled: true,
            text: 'Time  (HH:mm:ss)'
         },
         labels: {
            formatter: function() {
                var date = new Date(this.value);
                return date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
            }
         }
      },
      yAxis: {
         title: {
            text: document.getElementById("urlUnit").value
         }
      },
      series: [{
         name: 'Measurement',
         type: 'line',
         dataURL: '../../data/' + document.getElementById("urlData").value
      }]
   });
});
